/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * 知启蒙数据库映射（zhiqim_orm）在LGPL3.0协议下开源：https://www.zhiqim.com/gitcan/zhiqim/zhiqim_orm.htm
 *
 * This file is part of [zhiqim_orm].
 * 
 * [zhiqim_orm] is free software: you can redistribute
 * it and/or modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * [zhiqim_orm] is distributed in the hope that it will
 * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with [zhiqim_orm].
 * If not, see <http://www.gnu.org/licenses/>.
 */
package org.zhiqim.orm.test.qc.ex;

import org.zhiqim.orm.test.qc.dbo.QcAnswer;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 回复扩展表 对应视图《ANSWER_EX》
 */
@AnAlias("AnswerEx")
@AnNew
@AnView("QC_ANSWER,USER_ACCOUNT a,USER_ACCOUNT b")
@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="QC_ANSWER", lColumn="ANSWER_USER_ID", rTable="a", rColumn="USER_ID"),
             @AnViewJoinValue(type="LEFT", lTable="QC_ANSWER", lColumn="COMMENT_USER_ID", rTable="b", rColumn="USER_ID")})
public class AnswerEx extends QcAnswer
{
    private static final long serialVersionUID = 1L;
@AnDboField(type="string", column="")
    @AnViewField(table="a", column="USER_NICK")    private String answerUserNick;    //1.
    @AnViewField(table="a", column="USER_AVATAR_50")    private String answerUserAvatar50;    //2.
    @AnViewField(table="b", column="USER_NICK")    private String commentUserNick;    //3.
    @AnViewField(table="b", column="USER_AVATAR_50")    private String commentUserAvatar50;    //4.

    public String toString()
    {
        return Jsons.toString(this);
    }

    public String getAnswerUserNick()
    {
        return answerUserNick;
    }

    public void setAnswerUserNick(String answerUserNick)
    {
        this.answerUserNick = answerUserNick;
    }

    public String getAnswerUserAvatar50()
    {
        return answerUserAvatar50;
    }

    public void setAnswerUserAvatar50(String answerUserAvatar50)
    {
        this.answerUserAvatar50 = answerUserAvatar50;
    }

    public String getCommentUserNick()
    {
        return commentUserNick;
    }

    public void setCommentUserNick(String commentUserNick)
    {
        this.commentUserNick = commentUserNick;
    }

    public String getCommentUserAvatar50()
    {
        return commentUserAvatar50;
    }

    public void setCommentUserAvatar50(String commentUserAvatar50)
    {
        this.commentUserAvatar50 = commentUserAvatar50;
    }

}
